package de.nabble.model;

import java.util.ArrayList;
import java.util.List;


public class Model {

	private GameBoard board;
	private List<Player> players;

	public Model(GameBoard board) {
		this.board = board;
		this.players = new ArrayList<Player>();
	}
	
	public void putLetter(Player player, Letter letter, int x, int y) {
		board.setLetterOnField(player.takeLetterFromRow(letter), x, y);
		player.setPoints(player.getPoints() + calculateWordPoints());
	}
	
	private int calculateWordPoints() {
		return 0;
	}
	
	public void addPlayer(Player player) {
		players.add(player);
	}
	
	public void removePlayer(Player player) {
		players.remove(player);
	}

	public List<Player> getPlayers() {
		return players;
	}
	
}
